// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import i18n from './i18n'
import axios from 'axios'
import VueAxios from 'vue-axios'
import VueLazyLoad from 'vue-lazyload'
import VueQriously from 'vue-qriously'
import store from './store'
import filter from './filter'
import '@libs'
import components from './plugins/components'

require('@/api/mock')

Vue.config.productionTip = false

Vue.use(VueAxios, axios)
Vue.use(VueQriously)

// 配置拦截器
require('./api/axios')

// 配置懒加载
Vue.use(VueLazyLoad, {
  preload: 1,
  error: require('./assets/error.png'),
  loading: require('./assets/loading.png')
})

Vue.use(components)

// 配置过滤器
Vue.use(filter)

/* eslint-disable no-new */
const app = new Vue({
  el: '#app',
  router,
  store,
  i18n,
  components: { App },
  template: '<App/>'
})

export default app
